package com.zkh.myframe.database.mapper.tag;

import java.util.HashMap;
import java.util.Map;

import com.zkh.myframe.database.mapper.SQLEntity;
import com.zkh.myframe.database.mapper.parser.ParamValue;

/**
 * Include标签
 * @author zkh
 */
public class Include extends Tag {
	//Include调用Sql标签时，传递的参数
	private Map<String, ParamValue> paramMap = new HashMap<String, ParamValue>();
	
	//调用的SQL标签对象
	private SQLEntity sqlEntity;

	/**
	 * 获取参数
	 * @return
	 */
	public Map<String, ParamValue> getParamMap() {
		return paramMap;
	}
	
	/**
	 * 添加参数，重复设置相同key，后面的会将前面的覆盖
	 */
	public void putParam(String key, ParamValue value) {
		paramMap.put(key, value);
	}

	/**
	 * 获取SQL标签对象
	 * @return
	 */
	public SQLEntity getSqlEntity() {
		return sqlEntity;
	}

	/**
	 * 设置SQL标签对象
	 * @param sqlEntity
	 */
	public void setSqlEntity(SQLEntity sqlEntity) {
		this.sqlEntity = sqlEntity;
	}
}
